package com.video_study.controller;

import com.video_study.result.ResponseData;
import com.video_study.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/videos")
public class VideoController {
    @Autowired
    VideoService videoService;
    @GetMapping("/")
    public ResponseData getVideosByCourseId(String id){
        return videoService.getVideosByCourseId(id);
    }
}
